1. Field of the Invention
The present invention relates to a method, system, and program for managing write processes to a storage unit.
2. Description of the Related Art
Computing systems often include one or more host computers (“hosts”) for processing data and running application programs, direct access storage devices (DASDs) for storing data, and a storage controller for controlling the transfer of data between the hosts and the DASD. Storage controllers, also referred to as control units or storage directors, manage access to a storage space often comprised of numerous hard disk drives connected in a loop architecture, otherwise referred to as a Direct Access Storage Device (DASD). Hosts may communicate Input/Output (I/O) requests to the storage space through the storage controller.
A disk-shaped storage medium may be subdivided into physical portions, each of which is “pie-shaped” and is often referred to as a “sector.” Dividing the circular medium into pie slices facilitates location of data by the read/write heads of the drive. The diskette or disk is also typically divided into a number of concentric circles or tracks. Each track is typically divided into a number of clusters that represent the smallest unit of storage that is addressable for a read or write operation. Typically, a cluster is 256 or 512 bytes in length. Thus, data can be located by identifying one or more of the sectors, the concentric track and the clusters in which the data is stored.
In a write operation, data may be written to a storage medium. Should the write operation be interrupted by a power failure or device malfunction, the data written to the storage medium may be corrupted or otherwise incomplete. Accordingly, storage controllers frequently maintain a list of the destination locations in which data is being written. The list of destination locations for pending write operations is often kept in nonvolatile storage (NVS) memory so that the list information will be maintained even if power is lost.
Once a write operation to a particular destination location is completed, the destination location of that particular write operation may be removed from the list. However, should the write operations be interrupted before completion, the list of destination locations for pending write operations may be examined to identify the write destination locations which may contain incomplete or corrupted data.
FIG. 1 shows an example of a typical prior art pending write operation destination location list 10. In the example of FIG. 1, the list 10 has a plurality of entries 12a, 12b . . . 12n, each of which is capable of storing a destination location of a pending write operation. In the example of FIG. 1, the destination location is identified by a track identification (“track ID”) as shown by list entry 12c, for example. Following each entry of a track ID into one of the list entries 12a, 12b . . . 12n, a logical redundancy check may be performed on the contents of the list 10 and the check results can be stored in an entry 14.
Upon completion of a write operation, the track ID of the destination location of that write operation may be removed from the list 10 as shown by the list entry 12b, for example. In the example of FIG. 1, the list entries 12b, 12d, 12e and 12n are indicated to be available to store a track ID. Again, following the removal of a track ID from one of the list entries 12a, 12b . . . 12n, a logical redundancy check may be performed on the contents of the list 10 and the check results may be stored in the logical redundancy check entry 14.
To facilitate rapid identification of the available list entries of the list 10, a list of the available entries of the list 10 is often maintained. In the example of FIG. 1, the available list entries, such as entries 12b, 12d, 12e, for example, each contain a pointer which identifies the location of the next available list entry of the list entries 12a, 12b, . . . 12n. Such a pointer may take the form of an address offset, for example. However, the last available entry of the list 10, such as entry 12n, for example, may not contain a pointer since there is no next available entry after the last one. At initialization, prior to the initiation of write operations, each of the list entries 12a, 12b, . . . 12n of the list 10 may be available. Hence, when the list 10 is initialized, the list 10 may contain a pointer for each of the list entries 12a, 12b, . . . except last entry 12n. 
During operation, should the pending write operations be interrupted before completion, the list 10 of track ID's for pending write operations may be traversed. In this manner, the track ID's of the destination locations of the pending write operations, which may contain incomplete or corrupted data, may be identified.